#ifndef _GLOBAL_H
#define _GLOBAL_H

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<fcntl.h>
#include<malloc.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<sys/ioctl.h>
#include<unistd.h>

//定义数据最大值
#define DATA_NUM      (512*1024)

//枚举函数返回值
typedef enum errCode_e{
	EXIT_SUC,
	ARG_ERR,
	TYPE_NO_MATCH,
	OPEN_DEV_FAILURE,
	OPEN_FILE_FAILURE,
	READ_ERR,
	WRITE_ERR,
	CLOSE_FP_ERR,
	UNKNOW_TYPE
}errCode_t;

int ret;//函数返回值
char opt;//getopt()函数返回值
char *optarg;//getopt()函数返回值（选项）对应的参数
int optind, opterr, optopt;

#endif

